package com.geqian.web.chat;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @author geqian
 * @date 9:29 2022/10/11
 */

@Configuration
public class WebSocketConfig {
    /**
     * 注册 ServerEndpointExporter 组件，自动注入和使用 @ServerEndpoint 注解的 bean
     * @return
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
}